package com.yike.user.enums;

/**
 * 使用状态枚举
 *
 * @author whc
 * @since 2025-04-27
 */
public enum ShopFileEnum {
    YYZZ(2, "ID_CARD_FRONT",  "营业执照"),
    SFZZM(5, "ID_CARD_FRONT",  "身份证正面"),
    SFZBM(6, "ID_CARD_BEHIND",  "身份证反面"),
    ZKZH(7, "BUSINESS_LICENSE",  "上传门头照片"),
    YHZH(8, "BANK_CARD",  "银行卡"),
    XYK(9, "AGREE_MENT",  "协议"),
    KHZK(10, "OPENING_PERMIT",  "开户许可证"),
    KHZH(11, "CHECKSTAND_IMG",  "收银台照片"),
    DPNBZP(12, "SHOP_INSIDE_IMG",  "商铺内部照片");



    private final int type;       // 类型
    private final String code;

    private final String desc;    // 描述文本

    // 构造函数（私有）
    ShopFileEnum(int type,String  code, String desc) {
        this.type = type;

        this.code = code;
        this.desc = desc;
    }
    public int  getType() {
        return type;
    }
    // Getter 方法
    public String  getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    /**
     * 根据 类型 获取对应的code
     * @return 描述文本（未找到时返回默认值）
     */
    public static String getDescByCode(int type) {
        for (ShopFileEnum status : ShopFileEnum.values()) {
            if (status.type == type) {
                return status.code;
            }
        }
        return ""; // 默认值
    }


}
